package com.mstafkumax.ismamazigh;



import android.app.Activity;
import android.app.Application;
import android.content.ComponentName;
import android.content.Intent;
import android.os.Build;
import android.os.Bundle;
import android.view.Menu;
import android.view.MenuInflater;
import android.view.MenuItem;
import android.widget.TextView;

public class About extends Activity{
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.about);
	}
	/* Mostrar el menu*/
    @Override
    public boolean onCreateOptionsMenu(Menu menu) {
        MenuInflater inflater = getMenuInflater();
        inflater.inflate(R.menu.menuabout, menu);
        return true;
    }
    @Override
    public boolean onOptionsItemSelected(MenuItem item) {
        // Handle item selection
        switch (item.getItemId()) {
        case R.id.setting:
            settingIsmAmazigh();
            return true;
        case R.id.home:
            homeIsmAmazigh();
            return true;
        case R.id.exit:
            exitIsmAmazigh();
            return true;
        default:
            return super.onOptionsItemSelected(item);
        }
    }
	private void settingIsmAmazigh() {
		// TODO Auto-generated method stub
		Intent intento = new Intent();
		intento.setComponent(new ComponentName(this,Setting.class));
		intento.putExtra("About", "About");
		startActivity(intento);
		
	}
	private void exitIsmAmazigh() {
		// TODO Auto-generated method stub
		finish();// this method close the aplication
	}
	private void homeIsmAmazigh() {
		// TODO Auto-generated method stub
		Intent intento = new Intent();
		intento.setComponent(new ComponentName(this,IsmAmazighActivity.class));
		intento.putExtra("home", "home");
		startActivity(intento);		
	}

}
